#!/usr/bin/env bash
#
# author: feihai
#*
# 新建一个简单的脚本
#*
[[ $1 ]] || exit 1

cat > $1 << EOF
#!/usr/bin/env bash
#
# author: feihai
#* 
# 
#*

err() {
    printf 'error: %s\n' "\$1" >&2
    exit 1
}

[[ \$1 ]] || err ""

main() {
}
main "\$@"
EOF

chmod +x $1